home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1992-09-03 | 2.0 KB | 75 lines |
- ' "map" plasma by kyzer/csg, original acorn version by jan vibe
- ' familiar to london underground users...
- ' note: the key to the size of the joints is the size of dx() and dy()...
- Set Buffer 64
- SIZE=4
- Dim C(15,3) : For A=0 To 15 : For B=1 To 3 : C(A,B)=255 : Next B : Next A
- Degree : Hide
- Screen Open 0,320,256,16,0 : Curs Off : Flash Off : Cls 0
- A=$FFF : Palette 0,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A
- '
- Dim X(1,2000),Y(1,2000)
- Dim D(1,2000),F(1,2000)
- Dim DX(8),DY(8)
- '
- For N=0 To 7
- Read A,B
- DX(N)=SIZE*A
- DY(N)=SIZE*B
- Next
- P1=0 : P2=1 : C1=1
- X(P1,C1)=160
- Y(P1,C1)=128
- D(P1,C1)=Rnd(8)-1
- F(P1,C1)=Rnd(15)
- Repeat
- Swap P1,P2
- C2=C1 : C1=0
- Add F,1,1 To 15 : Ink F
- For N=1 To C2
- PX=X(P2,N) : PY=Y(P2,N)
- PD=D(P2,N) : PF=F(P2,N)
- '
- DP=(Rnd(3)+6+PD) mod 8
- If Extension_12_0470(PX+DX(DP),PY+DY(DP))=0
- XP=PX+DX(DP) : YP=PY+DY(DP) : Extension_12_04F0 PX,PY To XP,YP
- Inc C1 : X(P1,C1)=XP : Y(P1,C1)=YP : D(P1,C1)=DP : F(P1,C1)=FP
- End If
- If Rnd(1)>0.5
- For A=0 To 2
- DP=Rnd(8)
- If Extension_12_0470(PX+DX(DP),PY+DY(DP))=0
- XP=PX+DX(DP) : YP=PY+DY(DP) : Extension_12_04F0 PX,PY To XP,YP
- Inc C1 : X(P1,C1)=XP : Y(P1,C1)=YP : D(P1,C1)=DP : F(P1,C1)=FP
- Exit
- End If
- Next A
- End If
- Next
- Until C1=0
- '
- ' now it is drawn, we can colour cycle it!
- '
- Repeat
- Wait Vbl
- For N=14 To 1 Step -1
- For M=1 To 3
- C(N+1,M)=C(N,M)
- Next
- Next
- For M=1 To 3
- C(0,M)=C(0,M)+Rnd(13)+15
- C(1,M)=127*(Sin(C(0,M))+1)
- Next
- For N=1 To 15
- R=C(N,1)/16
- G=C(N,2)/16
- B=C(N,3)/16
- Colour N,(R*$100)+(G*$10)+(B*$1)
- Rem note the colour is actually calculated as 24-bit, but is scaled down
- Rem only because AMOS can't handle an AGA palette. It would be nice if I
- Rem could type "AGA Colour N,C(N,1)*$10000+C(N,2)*$100+C(N,3)"...
- Next
- Until Inkey$<>""
- '
- Data -1,1,0,1,1,1,1,0,1,-1,0,-1,-1,-1,-1,0